package dro.id.gl.engine;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;



import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

import dro.id.gl.engine.graphics.SpriteBatch;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.opengl.GLUtils;
import android.opengl.Matrix;
import android.os.SystemClock;
import android.util.Log;

public class DroidGLRenderer implements GLSurfaceView.Renderer {

	
	private Context m_oContext;
	
	
    public DroidGLRenderer(Context context) {
    	this.m_oContext = context;
        /*mTriangleVertices = ByteBuffer.allocateDirect(mTriangleVerticesData.length
                * FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();
        mTriangleVertices.put(mTriangleVerticesData).position(0);*/
    }
	
	


	@Override
	public void onDrawFrame(GL10 p_oGLUnused)
	{
		// TODO Auto-generated method stub
		GLES20.glClearColor((float)(Math.sin(System.currentTimeMillis()/1000.0)+1.0)/2.0f, (float)(Math.sin(System.currentTimeMillis()/300.0)+1.0)/2.0f, (float)(Math.sin(System.currentTimeMillis()/720.0)+1.0)/2.0f, 1.0f);
        GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
		
	}


	@Override
	public void onSurfaceChanged(GL10 p_oGLUnused, int width, int height)
	{
		// TODO Auto-generated method stub
		
		
	}


	@Override
	public void onSurfaceCreated(GL10 p_oGLUnused, EGLConfig config)
	{
		// TODO Auto-generated method stub
		
	}


}
